package com.nowcoder.service;

import com.nowcoder.entity.DiscussPost;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 讨论帖信息表 服务类
 * </p>
 *
 * @author cd
 * @since 2021-12-18
 */
public interface DiscussPostService extends IService<DiscussPost> {

    /**
     *
     * @param discussPost
     * @return
     */
    public int insertDiscussPost(DiscussPost discussPost);

    /**
     *
     * @param uid
     * @param offset
     * @param limit
     * @return
     */
    public List<DiscussPost> selectDiscussPosts(String uid, int offset, int limit);

    /**
     *
     * @param uid
     * @return
     */
    public int selectDiscussPostRows(@Param("uid") String uid);

    /**
     *
     * @param id
     * @return
     */
    public DiscussPost selectDiscussPostById(int id);

    /**
     *
     * @param id
     * @param commentCount
     * @return
     */
    public int updateCommentCount(int id, int commentCount);
}
